* (bug 8643) Correctly escape the page-specific CSS class for non-Monobook skins
authorAryeh Gregor <simetrical@users.mediawiki.org>
Mon, 15 Jan 2007 16:29:41 +0000 (16:29 +0000)
committerAryeh Gregor <simetrical@users.mediawiki.org>
Mon, 15 Jan 2007 16:29:41 +0000 (16:29 +0000)
* Tweak a comment
* Use $this->mTitle instead of $wgTitle in SkinTemplate, I suppose, although there's no difference

RELEASE-NOTES
includes/Sanitizer.php
includes/Skin.php
includes/SkinTemplate.php

index bf69b6b..6b2216f 100644 (file)
@@ -72,6 +72,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 8522) Provide a "delete" link on Special:Brokenredirects for users with
   the appropriate permission
 * (bug 8628) Add user-aware block list link to Special:Blockip
+* (bug 8643) Correctly escape the page-specific CSS class for non-Monobook skins
 
 == Languages updated ==
 
index 0c0f724..f7c31bd 100644 (file)
@@ -743,7 +743,7 @@ class Sanitizer {
         * Given a value, escape it so that it can be used as a CSS class and
         * return it.
         *
-        * TODO: For extra validity, input should be validated UTF-8.
+        * @todo For extra validity, input should be validated UTF-8.
         *
         * @link http://www.w3.org/TR/CSS21/syndata.html Valid characters/format
         *
index f7a862a..e7f6df8 100644 (file)
@@ -518,7 +518,7 @@ END;
                        $a['onload'] .= 'setupRightClickEdit()';
                }
                $a['class'] = 'ns-'.$wgTitle->getNamespace().' '.($wgContLang->isRTL() ? "rtl" : "ltr").
-               ' '.Sanitizer::escapeId( 'page-'.$wgTitle->getPrefixedText() );
+               ' '.Sanitizer::escapeClass( 'page-'.$wgTitle->getPrefixedText() );
                return $a;
        }
 
index 28619dc..b52609f 100644 (file)
@@ -193,7 +193,7 @@ class SkinTemplate extends Skin {
                $tpl->set( 'title', $wgOut->getPageTitle() );
                $tpl->set( 'pagetitle', $wgOut->getHTMLTitle() );
                $tpl->set( 'displaytitle', $wgOut->mPageLinkTitle );
-               $tpl->set( 'pageclass', Sanitizer::escapeClass( 'page-'.$wgTitle->getPrefixedText() ) );
+               $tpl->set( 'pageclass', Sanitizer::escapeClass( 'page-'.$this->mTitle->getPrefixedText() ) );
 
                $nsname = isset( $wgCanonicalNamespaceNames[ $this->mTitle->getNamespace() ] ) ?
                          $wgCanonicalNamespaceNames[ $this->mTitle->getNamespace() ] :